<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>经纪人中心</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="../css/mui.min.css">
    <link rel="stylesheet" href="../css/iconfont.css" />
    <link rel="stylesheet" href="../css/user.css">

    <style>
        .mui-views, .mui-view, .mui-pages, .mui-page, .mui-page-content
        {
            bottom:50px;
        }
        body{
            margin: 0px;
        }
    </style>

</head>

<body class="mui-fullscreen">
<!--页面主结构开始-->

<div id="app" class="mui-views">

    <div class="mui-pages" style="top: 0px!important;">
    </div>
    <div id="info"></div>
    <div class="footerpage">
    </div>
</div>
<!--页面主结构结束-->
<!--单页面开始-->
<div id="setting" class="mui-page">
    <div class="mui-page-content">
        <div class="mui-scroll-wrapper">
            <div class="mui-scroll">
                <div class=" bgblue userheader usershezhi">
                    <div class="usershezhi">
                        <a href="#" class="mui-pull-right topchilun"></a>
                    </div>
                    <ul class="mui-table-view bgnone userinfo">
                        <li class="mui-table-view-cell mui-media userinfoin">
                            <div class="mui-media-object mui-pull-left userinfoinimg"> <img src="../images/L8AAg1mQ81vlQ58AAAAASUVORK5CYII=.png" id="avatar"></div>
                            <div class="mui-media-body">

                                <p class="userinfonh" id="name"></p>
                                <p class='mui-ellipsis userinfot' id="mobile"></p>
                                <p class='mui-ellipsis userinfot' id="wuliao"></p>
                            </div>
                        </li>

                    </ul>
                </div>
                <ul class="mui-table-view mui-table-view-chevron">
                    <li class="mui-table-view-cell">
                        <!--                        类型:0=测斑,1=局部,2=升级,3=全套,4=售后,5=代理,6协助-->
                        <a href="agentfree.html?typedata=0" class="mui-navigate-right"><img src="../images/icon/mcard_profit_on.png" style="width: 21px;margin-right: 16px;"/>测斑订单</a>
                    </li>
                    <li class="mui-table-view-cell">
<!--                        类型:0=测斑,1=局部,2=升级,3=全套,4=售后,5=代理,6协助-->
                        <a href="agentuserorde.html?typedata=1" class="mui-navigate-right"><img src="../images/setting/2.png" style="width: 21px;margin-right: 16px;"/>体验订单</a>
                    </li>
                    <li class="mui-table-view-cell">
                        <a href="agentqianyuorder.html?typedata=3" class="mui-navigate-right"><img src="../images/setting/6.png" style="width: 21px;margin-right: 16px;"/>签约订单</a>
                    </li>
                    <li class="mui-table-view-cell">
                        <a href="assitantid.html" class="mui-navigate-right"><img src="../images/setting/6Mp9DYoBxRYDigH5Zf8LMABmPVPUQOzb3wAAAABJRU5ErkJggg==.png" style="width: 21px;margin-right: 16px;"/>协助订单</a>
                    </li>
                </ul>
                <ul class="mui-table-view mui-table-view-chevron">
                    <li class="mui-table-view-cell">
                        <a href="agentTeam.html?type=0" class="mui-navigate-right"><img src="../images/setting/avatar.76a75b8f17.png" style="width: 21px;margin-right: 16px;"/>我的粉丝</a>
                    </li>
                    <li class="mui-table-view-cell">
                        <a href="agentTeam.html?type=1" class="mui-navigate-right"><img src="../images/setting/avatar.76a75b8f17.png" style="width: 21px;margin-right: 16px;"/>我的团队</a>
                    </li>
                    <li class="mui-table-view-cell">
                        <a href="agetnwuliao.html" class="mui-navigate-right"><img src="../images/icon/goindex.png" style="width: 21px;margin-right: 16px;"/>物料记录</a>
                    </li>
                    <li class="mui-table-view-cell">
                    <a href="addwuliao.html" class="mui-navigate-right"><img src="../images/setting/Fyz2YWQ177VpTeSr2tBH87NYVkxSriKQCCQCiUAikAiUWvsnwABTSwDIZ7YMEAAAAABJRU5ErkJggg==.png" style="width: 21px;margin-right: 16px;"/>申请物料</a>
                </li>
                    <li class="mui-table-view-cell">
                        <a href="mymoney2.html" class="mui-navigate-right"><img src="../images/setting/3.png" style="width: 21px;margin-right: 16px;"/>我的钱包</a>
                    </li>
                    </li>
                    <li class="mui-table-view-cell">
                        <a href="wxfenx.html" class="mui-navigate-right"><img src="../images/icon/serviceselect.png" style="width: 21px;margin-right: 16px;"/>我的ID</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!--页面主内容区结束-->
</div>



</body>
<script src="../js/mui.min.js"></script>
<script src="../js/mui.view.js"></script>
<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/cookieutil.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/page/getuserBylogin.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/getUrlParam.js"></script>
<script>

    $(".footerpage").load("footer.html");
    //初始化单页view
    var viewApi = mui('#app').view({
        defaultPage: '#setting'
    });
    var  userid=getCookie('userid');
    if (userid==null||userid==undefined||userid=="")
    {
        geturlid();
    }
    else {
        mui.post('/User/findByid', {
                id: userid
            }, function (data) {
                var userdto = data.object;
                console.log(data);
                if (userdto.id !=null&& userdto.id != undefined&&userdto.id !="") {
                    setCookie('userdto', userdto);
                    setCookie('userid', userdto.id);
                    setCookie('username', userdto.username);
                    setCookie('openid', userdto.openid);
                    setCookie('upopenid', userdto.upopenid);
                    setCookie('materielA', userdto.materielA);
                    setCookie('materielB', userdto.materielB);
                    setCookie('avatar', userdto.avatar);
                    setCookie('level', userdto.level);
                    setCookie('money', userdto.money);
                    setCookie('mobile', userdto.mobile);
                    setCookie('address', userdto.address);
                    setCookie('isadmin', userdto.isadmin);
                    var username2=getCookie('username');
                    var o = document.getElementById('name');
                    o.innerHTML=username2;
                    var  avatar=getCookie('avatar');
                    // var avatar = document.getElementById("avatar");
                    // avatar.src = avatar//改变内容
                    $("#avatar").attr('src',avatar);
                    var  mobile2=getCookie('mobile');
                    var  materielA=getCookie('materielA');
                    var  materielB=getCookie('materielB');
                    var mobile = document.getElementById('mobile');
                    mobile.innerHTML=mobile2;
                    var wuliao = document.getElementById('wuliao');
                    wuliao.innerHTML="局部（"+materielA+")"+"全套（"+materielB+")";
                    if (materielA==0||materielB ==0)
                    {
                        var info = document.getElementById("info");
                        var btnArray = ['知道了'];
                        mui.confirm('你的物料已不足！请你去申请物料否则无法处理订单！', '提示', btnArray, function(e) {
                        })
                    }
                }
            }, 'json'

        );

        $(function () {

            function onBridgeReady() {
                WeixinJSBridge.call('hideOptionMenu');
            }

            if (typeof WeixinJSBridge == "undefined") {
                if (document.addEventListener) {
                    document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
                } else if (document.attachEvent) {
                    document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
                    document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
                }
            } else {
                onBridgeReady();
            }
        });
    }
</script>

</html>